package TraLaLa.Ventanas.User;

import javax.swing.JFrame;

import TraLaLa.Cliente.ClienteUser.UserControler;
import TraLaLa.Servidor.GestorUsuarios.Usuario;

public class IntroWindow extends JFrame{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private UserPanel pnl;
	private ActionPanel pnl2;
	private UserControler controler;
	private Usuario usuario;
		
	public IntroWindow(UserControler controler, Usuario user){
		this.controler=controler;
		this.usuario= user;
		pnl2 = new ActionPanel(this.controler, this.usuario, this);
		pnl = new UserPanel(usuario, this.controler);
		this.setLayout(null);
		this.add(pnl);
		this.add(pnl2);
		
		pnl.setBounds(0, 0, 300, 300);
		pnl2.setBounds(300,0,300,300);
		
		this.setSize(600,300);
		this.setDefaultCloseOperation(EXIT_ON_CLOSE);
		this.setVisible(true);
		
		this.setLocationRelativeTo(null);
		
	}
	public void actualizar(){
		pnl.actualizar();
	}
}
